#include <thread_pool.h>

#include <sstream>

int main()
{
    auto tp = ThreadPool::GetInstance();

    for (int i = 0 ; i < 600000; i++) {
        std::stringstream ss;
        ss << "inc" << i;
        tp->PostTask([]() {
            volatile int cnt = 0;
            for (int i = 0; i < 1000000; i++) {
                cnt += i;
                if (i % 3 == 2) {
                    i -= i / 2 % 3;
                }
            }
        }, ss.str());
    }
    return 0;
}
